package dabs.engine.control;

import java.io.Serializable;

import dabs.engine.environment.AcceptsModifier;
import dabs.engine.environment.Modifier;
import dabs.engine.plant.ComponentPart;
import dabs.engine.plant.PowerPlant;

public class OperatorSoftware implements AcceptsModifier, Serializable {
	private static final long serialVersionUID = 1638651205659512640L;
	
	PowerPlant powerPlant;
	
	public OperatorSoftware(PowerPlant pplant) {
		this.powerPlant = pplant;
	}
	
	public void runCommand(ComponentCommand command) {
		for (ComponentPart comp : powerPlant.getComponents()) {
				if (comp.getName().equals(command.getDestination())) {
				comp.runCommand(command);
			}
		}
	}
	
	public void handleModifier(Modifier modifier) {
		// STUB! We don't have software failures... yet :P
	}

}
